package cn.net.ecode.elec.api.web;

import cn.net.ecode.annotation.Login;
import cn.net.ecode.annotation.LoginUser;
import cn.net.ecode.common.web.BaseController;
import cn.net.ecode.mdm.entity.MdmBtypeInfo;
import cn.net.ecode.mdm.service.MdmBtypeInfoService;
import cn.net.ecode.modules.sys.entity.User;
import cn.net.ecode.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName AppUserController
 * @Description 用户注册接口
 * @Author AlanShelby
 * @Date 2019/8/27 0027 8:43
 * @Version 1.0
 */
@RestController
@RequestMapping("/api/btype")
public class AppBtypeController extends BaseController {
    @Autowired
    MdmBtypeInfoService mdmBtypeInfoService;

    /**
     * 获取企业数据
     *
     * @param btypeId
     * @return
     */
    @Login
    @RequestMapping(value = "btypeInfo", method = RequestMethod.GET)
    public R userInfo(@RequestParam String btypeId) {
        MdmBtypeInfo mdmBtypeInfo = new MdmBtypeInfo();
        mdmBtypeInfo.setId(btypeId);
        mdmBtypeInfo = mdmBtypeInfoService.get(mdmBtypeInfo);
        return R.ok().put("mdmBtypeInfo", mdmBtypeInfo);
    }
}
